-
Notifications
You must be signed in to change notification settings - Fork 235
Closes #7284: Preload Fonts - Filter to add extensions #7318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closes #7284: Preload Fonts - Filter to add extensions #7318
Conversation
Co-authored-by: WordPressFan <[email protected]> Co-authored-by: Michael Lee <[email protected]> Co-authored-by: Gaël Robin <[email protected]>
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
wordpressfan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filter is not working now because of the mentioned line.
remyperona
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little improvement
Co-authored-by: Rémy Perona <[email protected]>
Co-authored-by: Rémy Perona <[email protected]>
|
@Miraeld Thanks for the PR.
|
|
All test following testrail are green :) |
Description
Fixes #7284
Adds a filter
rocket_preload_fonts_processed_extensionsto customize extension of fonts sent to the beacon script.Example of usage:
Type of change
Detailed scenario
What was tested
Integration tests are making sure that
processed_extensionsis added to the JS variable used by the beacon (rocket_beacon_data).How to test
Just open a page that would include the beacon, and make sure that
processed_extensionsis added to the JS variable used by the beacon (rocket_beacon_data).Also, you can change its value by using the filter
rocket_preload_fonts_processed_extensions, example of usage:Technical description
Documentation
This pull request includes changes to the handling of font extensions in the
rocket_beacon_dataobject and the addition of a filter for processed font extensions. The most important changes are the introduction of a new array for processed font extensions and the updates to various HTML fixture files to include this new data.Enhancements to font extension processing:
inc/Engine/Media/PreloadFonts/Frontend/Controller.php: Added a new arrayprocessed_extensionsfor font extensions and applied a filterrocket_preload_fonts_processed_extensionsto it.Updates to HTML fixture files:
tests/Fixtures/inc/Engine/Common/PerformanceHints/Frontend/Subscriber/HTML/no_closing_body_tag_output.html: Updated therocket_beacon_dataobject to include the newprocessed_extensionsarray.tests/Fixtures/inc/Engine/Common/PerformanceHints/Frontend/Subscriber/HTML/output_double_body_tag.html: Updated therocket_beacon_dataobject to include the newprocessed_extensionsarray.tests/Fixtures/inc/Engine/Common/PerformanceHints/Frontend/Subscriber/HTML/output_w_beacon.html: Updated therocket_beacon_dataobject to include the newprocessed_extensionsarray.tests/Fixtures/inc/Engine/Common/PerformanceHints/Frontend/Subscriber/HTML/output_with_beacon_and_atf_opt.html: Updated therocket_beacon_dataobject to include the newprocessed_extensionsarray.tests/Fixtures/inc/Engine/Common/PerformanceHints/Frontend/Subscriber/HTML/output_with_beacon_and_only_lrc_opt.html: Updated therocket_beacon_dataobject to include the newprocessed_extensionsarray.New dependencies
None
Risks
None
Mandatory Checklist
Code validation
Code style